﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace H2.NET.Web.Workflow.UserControls
{
    public partial class Pager : System.Web.UI.UserControl
    {
        /// <summary>
        /// 数据量共计
        /// </summary>
        public int TotalItemCount { get; set; }

        /// <summary>
        /// 分页大小（每页显示的数量）
        /// </summary>
        public int? PageSize { get; set; }

        /// <summary>
        /// 当前页数
        /// </summary>
        public int PageNumber { get; set; }

        protected void Page_Load(object sender, EventArgs e)
        {
            HttpCookie cookie = new HttpCookie("AKS_PAGE_SIZE");    //初使化并设置Cookie的名称
            cookie.Expires = DateTime.MaxValue;                     //设置过期时间
            cookie.Value = PageSize.ToString();
            Response.AppendCookie(cookie);
        }
    }
}